package com.jishuo.nontax.api.socket.handle;

import com.jishuo.base.bean.BaseResult;
import com.jishuo.base.util.SpringContextUtil;
import com.jishuo.nontax.api.socket.ApiHandle;
import com.jishuo.nontax.bfc.service.DailiBankService;
import org.dom4j.Element;

/**
 * @author hlp
 * @date 2023/2/8 15:16
 * @Description:
 */
public class DailiBankApi implements ApiHandle {
    @Override
    public BaseResult execute(String head, Element body) {
        if (head.equals("selDailiBank")) { //获取代理银行信息
            String cantonid = body.selectSingleNode("//root/body/cantonid").getText();
            String accountcode = body.selectSingleNode("//root/body/accountcode").getText();

            DailiBankService dailiBankService = (DailiBankService) SpringContextUtil.getBean("dailiBankService");
            return dailiBankService.selDailiBank(Long.valueOf(cantonid),accountcode);

        }
        return null;
    }
}
